package Coding.IO;
/**
 * 读取文件
 */

import java.io.FileInputStream;
import java.io.IOException;

public class FIS {
    private FileInputStream fileInputStream;

    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("./demo.txt");
        int data = fileInputStream.read();
        System.out.println((char) data);



        int data2 ;
        while (( data2 = fileInputStream.read() ) !=-1){
            System.out.println((char) data2);
        }
        fileInputStream.close();



    }
}
